package com.lmonkey.servlet.product;

import com.lmonkey.servic.CATAGORYDao;
import com.lmonkey.shop.CATEGORY;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;

@WebServlet("/admin/admin_toproductadd")
public class ToProductAdd extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        ArrayList<CATEGORY> flist = CATAGORYDao.selectcat("father");
        request.setAttribute("flist",flist);
        ArrayList<CATEGORY> clist = CATAGORYDao.selectcat("child");
        request.setAttribute("clist",clist);

        request.getRequestDispatcher("admin_productadd.jsp").forward(request,response);
    }
}
